<?php include TMPL_PATH.'public/header.phtml';?>
<link rel="stylesheet" type="text/css" href="/statics/js/calendar/jscal2.css"/>
<link rel="stylesheet" type="text/css" href="/statics/js/calendar/border-radius.css"/>
<link rel="stylesheet" type="text/css" href="/statics/js/calendar/win2k.css"/>
<script type="text/javascript" src="/statics/js/calendar/calendar.js"></script>
<script type="text/javascript" src="/statics/js/calendar/lang/zh-cn.js"></script>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
    	<div style="float:left;margin-right:50px;">
        <a href='javascript:;' class="on"><em>产品搜索结果列表</em></a>
     </div>
    	<div style="color:#000;">
			<div style="float:left;">
    		<form name="searchform" action="<?php echo U('product/search');?>"  method="post">
    		<input type="hidden" value="1" name="search">
			<input type="hidden" value="<?php echo $pageRows; ?>" name="pageRows">
 				&nbsp;&nbsp;&nbsp;搜索关键字:
				<input type="text" class="input-text" value="<?php echo $searchkeyword;?>" name="searchkeyword"  id="searchkeyword" />           
				&nbsp;&nbsp;&nbsp;<select name="searchtype" id="searchtype" >
					<option <?php if($searchtype==0)echo 'selected';?> value="0">用户邮箱</option>
					<option value="1" <?php if($searchtype==1)echo 'selected';?>>sid</option>
				</select>
				<input type="text" class="input-text" value="<?php echo $keyword;?>" name="keyword"  id="keyword" />
                
			   &nbsp;&nbsp;&nbsp;用户类型: <select name="usertype" id="usertype">
					<option <?php if($usertype==1)echo 'selected';?> value="1">注册用户</option>
					<option value="2" <?php if($usertype==2)echo 'selected';?>>全部</option>
					<option value="3" <?php if($usertype==3)echo 'selected';?>>游客</option>
				</select>
				
				&nbsp;&nbsp;&nbsp;&nbsp;
				    搜索时间:
				    <input class="input-text" name="start_time" type="text" id="start_time" size="22" value="<?php echo $start_time;?>" />
				    <script type="text/javascript">
						Calendar.setup({
						weekNumbers: false,
					    inputField : "start_time",
					    trigger    : "start_time",
					    dateFormat: "%Y-%m-%d",
					    showTime: false,
					    minuteStep: 1,
					    onSelect   : function() {this.hide();}
						});
				    </script>
				    至:<input class="input-text"  name="end_time" type="text" id="end_time" size="22" value="<?php echo $end_time;?>" />
					<script type="text/javascript">
						Calendar.setup({
						weekNumbers: false,
					    inputField : "end_time",
					    trigger    : "end_time",
					    dateFormat: "%Y-%m-%d",
					    showTime: false,
					    minuteStep: 1,
					    onSelect   : function() {this.hide();}
						});
					</script>
                   &nbsp;&nbsp;&nbsp;&nbsp;
					<input type="submit" value="搜索" class="button" name="search">
    		</form>
			</div>
<!--			<div style="float:right;">
                 <a href="javascript:carProductExcel();">导出Excel</a>
			</div>-->
    	</div>
    </div>
</div>
<div class="bk"></div>
<div class="pad_10">
<div class="table-list">
    <table width="100%" cellspacing="0" >
        <thead>
            <tr>
            <th width="15%">序号</th>
            <th width="15%">关键字</th>
            <th align='center' width="20%">搜索人</th>
            <th align='center' width="15%">搜索时间</th>
            <th align='center' width="15%">ip</th>
            <th align='center' width="20%">搜索结果</th>
            </tr>
        </thead>
    <tbody>
    <?php
   	if(isset($searchList) && $searchList):
   		foreach ($searchList as $k=>$v):
    ?>
			<tr>
                <td align='center'><?php echo $v['id'];?></td>
                <td align='center'><?php echo $v['keyword'];?></td>
				<td align='center'>
					<?php echo !empty($v['email']) ? $v['email'] : '游客'.'<br />'.$v['sid'];; ?>
					<?php /*if($v['user_id']>0){echo "<br />用户语言：".$v['language'];};*/?>
				</td>
                <td align='center'><?php echo date('Y-m-d H:i:s',$v['add_time']);?></td>
                <td align='center'><?php echo $v['ip'];?> - <?php echo $v['ip_tips'];?></td> 
                <td align='center'><?php echo $v['result'];?></td> 
			</tr>
	<?php 
		endforeach;
		endif;
	?>
   </tbody>
    </table>
<div id="pages"><?php echo $pageShow;?></div>
</div>
</div>
</body>
</html>